/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.inse6260.atms.model;

import java.sql.Timestamp;

/**
 *
 * @author dimitri.tiago
 */
public class TransactionLineItem
{
    private int id;
    private int accountNumber;
    private String transactionType;
    private float amount;
    private Timestamp date;

    public TransactionLineItem(int transId, int accNumber, String transType, float amt, Timestamp transDate)
    {
        id = transId;
        accountNumber = accNumber;
        transactionType = transType;
        amount =amt;
        date = transDate;
    }

    public int getID()
    {
        return id;
    }

    public int getAccNumber()
    {
        return accountNumber;
    }

    public String getTransType()
    {
        return transactionType;
    }

    public float getAmount()
    {
        return amount;
    }

    public String getTimestamp()
    {
        return date.toString();
    }

    @Override
    public String toString()
    {
        String dateString = date.toString();
        String str = String.format("%-60d%-30d%-30s%-30.2f%s\n", id, accountNumber, transactionType, amount, dateString);
        return str;
    }
}
